package com.studylazy.phprpc.examples;

import com.studylazy.phprpc.annotation.PHPRPC;

/**
 * Easy and quick start a PHPRPC server using java annotation
 * 
 * @param urlPattern example: http://[host][contextPath][urlPattern]
 * 
 * @author abola <abola@study-lazy.com>
 * @see http://www.study-lazy.com/2012/10/phprpc-in-java-annotation.html
 */
@PHPRPC(urlPattern = "/PhprpcSimpleExample.phprpc")
public class PhprpcSimpleExample {

	public String get(){
		return "Hello";
	}
	
	public static String set(String msg){
		return msg;
	}
	
	/**
	 * Only public method publish 
	 * 
	 * example : try other access modifier
	 */
	
	private String getPrivate(){
		// client got NoSuchMethodException
		return "private got";
	}
	
	String getFriendly(){
		// client got NoSuchMethodException
		return "friendly get";
	}
	
	protected String getProtected(){
		// client got NoSuchMethodException
		return "protected got";
	}
	
}
